package com.hnkywl.jip.service;

import com.hnkywl.jip.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created with IntelliJ IDEA.
 * User: ZHUCHG
 * Date: 13-3-6
 * Time: 下午1:46
 * To change this template use File | Settings | File Templates.
 */
@Service
public class LoginService {
    /**
     * 用户数据层
     */
    private UserDao userDao;

    /**
     * @param userCode 用户名
     * @param password 密码
     */
    @Transactional
    public Object[] login(String userCode, String password) {
        // 调用 UserDao.Login
        return this.userDao.login(userCode, password);
    }

    @Autowired
    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }
}
